package jubaozhu.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import jubaozhu.domain.Pic;
import jubaozhu.extra.pojo.PicPo;
import jubaozhu.mapper.PicMapper;
import jubaozhu.service.PicService;
import jubaozhu.extra.base.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import tk.mybatis.mapper.common.Mapper;
import zhibi.frame.domain.Page;
import zhibi.frame.mybatis.example.Example;

/**
* The class create by 执笔 on generate.
*/
@Service
@Transactional
public class PicServiceImpl extends BaseServiceImpl<Pic> implements PicService{


    @Autowired
    private PicMapper picMapper;
    @Autowired
    public PicServiceImpl(PicMapper mapper) {
        super(mapper);
    }

    @Override
    public PageInfo<PicPo> selectPoByExample(Example example, Page page) {
        PageHelper.startPage(page.getPageNum(),page.getPageSize());
        return new PageInfo<PicPo>(picMapper.selectPoByExample(example),5);
    }
}